Frequency calibration method applicable in universal serial bus device and related universal serial bus device

ABSTRACT

A frequency calibration method applied to a Universal Serial Bus (USB) device includes: coupling the USB device to a USB host, wherein the USB device at least comprises a programmable oscillator; utilizing the USB device to extract a low frequency periodic signal from the USB host; and calibrating the programmable oscillator of the USB device according to the low frequency periodic signal, to make the programmable oscillator generate an oscillating signal having a predetermined frequency.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a frequency calibration methodapplicable in a Universal Serial Bus (USB) device and a related USBdevice, and more particularly, to a method of utilizing a low frequencyperiodic signal to calibrate an oscillator of a USB device and a relatedUSB device.

2. Description of the Prior Art

With the development in the technical field of the Universal Serial Bus(USB), the latest data transmission interface has been updated to theUSB 3.0. The maximum data transmission speed of the USB 3.0 reaches 5Gigabit per second (Gbps). In other words, the operation clock of USB3.0 device is at least 2.5 GHz. In a traditional method, a preciseinductor capacitor oscillator (LC oscillator) is built in a USB 3.0device, and the LC oscillator will oscillate to generate a referenceclock having a precise frequency. Next, a signal synthesizer may beutilized to synthesize a 2.5 GHz operation clock based on the referenceclock. However, an LC oscillator usually occupies a very large chiparea, thus raising the manufacturing cost of the USB 3.0 device. Hence,how to generate a reference clock having a precise frequency with lowercost has become an important issue to be solved in the pertinent field.

SUMMARY OF THE INVENTION

Hence, one of the objectives of the present invention is to provide amethod for calibrating an oscillator in a Universal Serial Bus (USB)device through utilizing a low frequency periodic signal, and to providean associated USB device.

According to a first embodiment of the present invention, a frequencycalibration method applied to a USB device is provided. The methodincludes: coupling the USB device to a USB host, wherein the USB deviceat least comprises a programmable oscillator ; utilizing the USB deviceto extract a low frequency periodic signal from the USB host; andcalibrating the programmable oscillator of the USB device according tothe low frequency periodic signal, to make the programmable oscillatorgenerate an oscillating signal having a predetermined frequency.

According to a second embodiment of the present invention, a USB deviceis provided. The USB device includes a detection circuit, a programmableoscillator and a control circuit. The detection circuit is arranged toextract a low frequency periodic signal (LFPS) from the USB host. Theprogrammable oscillator is arranged to generate an oscillating signal.The control circuit is coupled to the detection circuit and theprogrammable oscillator, and arranged to calibrate the programmableoscillator according to the low frequency periodic signal, to make theprogrammable oscillator generate the oscillating signal having apredetermined frequency.

According to the aforementioned embodiments of the present invention,the USB device of the present invention is capable of generating areference clock having a precise frequency without the need for abuilt-in precise inductor conductor oscillator. Hence, compared withtraditional methods, the cost of the USB device of the present inventionis lower.

These and other objectives of the present invention will no doubt becomeobvious to those of ordinary skill in the art after reading thefollowing detailed description of the preferred embodiment that isillustrated in the various figures and drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram illustrating a USB device according to an embodimentof the present invention.

FIG. 2 is a partial state diagram illustrating certain states of a USBhost when a USB device is plugged into the USB host according to anembodiment of the present invention.

FIG. 3 is a flowchart illustrating a frequency calibration methodaccording to an embodiment of the present invention.

FIG. 4 is a timing diagram illustrating a low frequency periodic signaland a detection oscillating signal according to an embodiment of thepresent invention.

FIG. 5 is a diagram illustrating a control circuit according to anembodiment of the present invention.

FIG. 6 is a flowchart illustrating a calibration method arranged forcalibrating a programmable oscillator based on a low frequency periodicsignal according to an embodiment of the present invention.

DETAILED DESCRIPTION

Certain terms are used throughout the description and following claimsto refer to particular components. As one skilled in the art willappreciate, manufacturers may refer to a component by different names.This document does not intend to distinguish between components thatdiffer in name but not function. In the following description and in theclaims, the terms “include” and “comprise” are used in an open-endedfashion, and thus should be interpreted to mean “include, but notlimited to . . . ”. Also, the term “couple” is intended to mean eitheran indirect or direct electrical connection. Accordingly, if one deviceis coupled to another device, that connection may be through a directelectrical connection, or through an indirect electrical connection viaother devices and connections.

Please refer to FIG. 1, which is a diagram illustrating a UniversalSerial Bus (USB) device 100 according to an embodiment of the presentinvention. The USB device 100 includes a detection circuit 102, acontrol circuit 104, a programmable oscillator 106, a transmissioncircuit 108 and a terminal impedance 110. When the USB device 100 iscoupled to a USB host 112, the detection circuit 102 is used to extracta low frequency periodic signal (LFPS) Sps, which is a polling LFPS,from the USB host 100, to generate a detection oscillating signal Spsrhaving a frequency the same as that of the low frequency periodic signalSps. The programmable oscillator 106 is coupled to the control circuit104, and arranged for generating an oscillating signal Sosc according toa control word Sc. The control circuit 104 is coupled to the detectioncircuit 102 and the programmable oscillator 106, and arranged forcalibrating the programmable oscillator 106 of the USB device 100according to the detection oscillating signal Spsr, to make theprogrammable oscillator 106 generate an oscillating signal Sosc having apredetermined frequency Fp. Further, the terminal impedance 110 iscoupled to the control circuit 104 and a pair of signal ports RXP andRXN of the detection circuit 102, wherein the signal ports RXP and RXNare used to receive the low frequency periodic signal Sps from the USBhost 112. The transmission circuit 108 is coupled to the control circuit104 and a pair of signal ports TXP and TXN, wherein the signals of theUSB device 100 are transmitted to the USB host 112 through the signalports TXP and TXN.

According to an embodiment of the present invention, the USB device 100is a USB 3.0 device, and the USB host 112 is a USB 3.0 host. However,the present invention is not limited thereto. In another embodiment, theUSB host 112 may be a USB 3.0 hub. When the USB device 100 is pluggedinto the USB host 112, and the USB device 100 and the USB host 112 havenot entered an ultra-high data transmission mode (i.e. 5 Gbps) of USB3.0, the USB device 100 performs a frequency calibration method tocalibrate the programmable oscillator 106 in advance, so as to make theprogrammable oscillator 106 capable of generating the oscillating signalSosc having the predetermine frequency Fp, wherein the oscillatingsignal Sosc having the predetermined frequency Fp is used as a referenceclock for synthesizing an operation clock (e.g., a 2.5 GHz operationclock) needed for operating the USB device 100 in the ultra-high speeddata transmission mode.

Please refer to FIG. 2, which is a partial state diagram 200illustrating certain states of the USB host 112 when the USB device 100is plugged into the USB host 112 according to an embodiment of thepresent invention. The state 202 represents that the USB host 112determines that the USB device 100 is not activated yet. The state 204represents that the USB host 112 has detected the existence of theterminal impedance 110 of the USB device 100. The state 206 representsthat USB host 112 starts to perform polling on the USB device 100. Thestate 208 represents that the USB host 112 and the USB device 100 haveentered the ultra-high speed data transmission mode. In order to makethe USB device 100 have sufficient time to calibrate the programmableoscillator 106 before the USB device 100 and the USB host 112 enter theultra-high speed data transmission mode, the frequency calibrationmethod of the present invention temporarily extends the time of the USBhost 112 performing the polling operation upon the USB device 100 instate 206. Specifically, according to FIG. 2 of the present invention,state 206 includes three states, i.e., states 2062, 2064 and 2066. Thestate 2062 represents that the USB host 112 transmits the low frequencyperiodic signal Sps to the USB device 100. The state 2064 representsthat the USB host 112 receives a polling low frequency periodic signalSps from the USB device 100. The state 2066 represents that the USB host112 enters a compliance mode. In order to retain the USB host 112 in thestate 2062 for continuously transmitting the low frequency periodicsignal Sps to the USB device 100, the frequency calibration method ofthe present invention prevents the USB host 112 from entering the state2064 or the state 2066, until the calibration upon the programmableoscillator 106 is completed.

Hence, when the USB device 100 is plugged into the USB host 112, the USBdevice 100 performs the frequency calibration method 300 shown in FIG. 3to calibrate the programmable oscillator 106, so as to make theprogrammable oscillator 106 capable of generating the oscillating signalSosc having the predetermined frequency Fp. Please refer to FIG. 3,which is a flowchart illustrating a frequency calibration method 300according to an embodiment of the present invention. Provided that theresult is substantially the same, the steps are not required to beexecuted in the exact order shown in FIG. 3. That is, other steps may beinserted into the steps in FIG. 3. The method 300 includes the followingsteps.

Step 302: Plug the USB device 100 into the USB host 112.

Step 304: Control the USB device 100 to enable the terminal impedance110 in the USB device 100, thus allowing the USB host 112 to transmit alow frequency periodic signal Sps to the USB device 100.

Step 306: Delay a first delay time t1.

Step 308: Determine whether the USB device 100 receives the lowfrequency periodic signal Sps. If yes, go to step 310; otherwise, go tostep 306.

Step 310: Utilize the USB device 100 to extract the low frequencyperiodic signal Sps from the USB host 112.

Step 312: Calibrate the programmable oscillator 106 in the USB device100 according to the low frequency periodic signal Sps.

Step 314: Determine whether the programmable oscillator 106 generates anoscillation signal Sosc having a predetermined frequency Fp. If yes, goto step 316; otherwise, go to step 312.

Step 316: Temporarily store a control word Sc in a register, wherein thecontrol word Sc is arranged for controlling the programmable oscillator106 to generate the oscillation signal Sosc having the predeterminedfrequency Fp.

Step 318: Control the USB device 100 to disable the terminal impedance110 of the USB device 100.

Step 320: Delay a second delay time t2.

Step 322: Perform an initial activation procedure of the USB device 100.

Step 324: Feed an internal source program (ISP) from the USB device 100.

Step 326: Store the control word Sc into a flash memory of the USBdevice 100.

Please note that, in step 304, when the terminal impedance 110 isenabled, the USB host 112 detects the existence of the terminalimpedance 110 and thereby outputs the low frequency periodic signal Sps.On the contrary, when the terminal impedance 110 is disabled, the USBhost 112 does not detect the existence of the terminal impedance 110,and the USB host 112 determines that the USB device 110 is not correctlycoupled to the USB host 112. When the USB host 112 transmits the lowfrequency periodic signal Sps to the USB device 100, the control circuit104 controls the detection circuit 102 to first wait for the first delaytime t1 and then detect the low frequency periodic signal Sps from theUSB host 112. This is because when the USB host 112 detects theexistence of the terminal impedance 110, the USB host 112 does notcertainly transmit the low frequency periodic signal Sps immediately.According to the USB 3.0 specification, when the USB host 112 detectsthe existence of the terminal impedance 110, the USB host 112 musttransmit the low frequency periodic signal Sps in 50 ms (millisecond).Hence, through proper designs, when the first delay time t1 is reached,the detection circuit 102 of the USB device 100 should have received thelow frequency periodic signal Sps from the USB host 112.

Please refer to FIG. 4, which is a timing diagram illustrating a lowfrequency periodic signal Sps and a detection oscillating signal Spsraccording to an embodiment of the present invention. The low frequencyperiodic signal Sps is a periodic signal having an approximate 10% dutycycle and an approximate 100 KHz frequency. Specifically, a polling lowfrequency periodic signal Sps is divided into two parts, i.e., the firstpart 402 and the second part 404. The first part 402 is a high frequencyperiodic signal, where the period of each high frequency signal is about10 ns-100 ns. The second part 404 is an idle time having no signal. Thestandardized lasting time tBurst of the first part 402 is 1 μs(microsecond) (i.e., the pulse width time of the low frequency periodicsignal Sps corresponding to the detection oscillating signal Spsr),while the range allowed by the USB 3.0 specification is 0.6 μs-1.4 μs.Besides, the standardized lasting time tRepeat of the second part 404 is9 μs (i.e., the pulse period of the low frequency periodic signal Spscorresponding to the detection oscillating signal Spsr), while the rangeallowed by the USB 3.0 specification is 6 μs-14 μs. Although thestandardized lasting time tBurst of the first part 402 and thestandardized lasting time tRepeat of the second part 404 may be freelydecided in the allowed range, the standardized lasting time tBurst ofthe first part 402 is usually fixed (approximately at 1 μs), and theratio of the standardized lasting time tBurst of the first part 402 andthe standardized lasting time tRepeat of the second part 404 is usuallyfixed as well. In other words, the duty cycle of the low frequencyperiodic signal Sps is usually fixed at 10%, and the frequency thereofis usually fixed at 100 KHz. Hence, the USB device 100 may utilize thesecharacteristics of the low frequency periodic signal Sps to identify andextract the low frequency periodic signal Sps, so as to generate thedetection oscillating signal Spsr having a frequency the same as that ofthe low frequency periodic signal Sps to calibrate the programmableoscillator 106. This makes the programmable oscillator 106 generate theoscillating signal Sosc having the predetermined frequency Fp.

Specifically, the detection circuit 102 extracts the detectionoscillating signal Spsr which is identical to the low frequency periodicsignal Sps. Then, the control circuit 104 reads the detectionoscillating signal Spsr, and outputs the control word Sc to adjust theoscillating signal Sosc of the programmable circuit 106. Please notethat, as can be seen from the embodiment of FIG. 1, the control circuit104 and the programmable oscillator 106 are coupled in a feedbackconfiguration. In other words, the control circuit 104 simultaneouslyoutputs different control words Sc to adjust the programmable oscillator106 and receives the corresponding oscillating signal Sosc to calculatethe oscillating frequency thereof, until the oscillating frequency ofthe oscillating signal Sosc is calibrated to the predetermined frequencyFp. Hence, in order to make the control circuit 104 have sufficient timeto calibrate the programmable circuit 106, the control circuit 104 ofthe present invention simultaneously controls the transmission circuit108 to stop generating a corresponding low frequency periodic signal tothe USB host 112, to make the USB host 112 continuously generate the lowfrequency periodic signal Sps to the USB device 100. In an embodiment,when the USB device 100 receives the low frequency periodic signal Spsfrom the USB host 112, the control circuit 104 controls the transmissioncircuit 108 to continuously generate a predetermined signal having afrequency higher than that of the low frequency periodic signal Sps tothe USB device 100, so as to make the USB host 112 continuously generatethe low frequency periodic signal Sps to the USB device 100. Forexample, the predetermined signal may be a high frequency signal havinga period of approximate 10 ns-100 ns.

In another embodiment of the present invention, when the USB device 100receives the low frequency periodic signal Sps form the USB host 112,the control circuit 104 controls the transmission circuit 108 to stopgenerating a normal response signal to the USB host 112, so as to makethe USB host 112 continuously generate the low frequency periodic signalSps to the USB device 100.

Further, in another embodiment of the present invention, when the USBdevice 100 receives the low frequency periodic signal Sps from the USBhost 112, the control circuit 104 controls the transmission circuit 108to generate a predetermined signal dissimilar to the low frequencyperiodic signal Sps to the USB host 112, so as to make the USB host 112continuously generate the low frequency periodic signal Sps to the USBdevice 100.

In step 316, when the programmable oscillator 106 has been calibrated togenerate the oscillating signal Sosc having the predetermined frequencyFp, the control circuit 104 temporarily stores the corresponding controlword Sc into a register. At the same time, the control circuit 104disables the terminal impedance 110 of the USB device 100, to make theUSB host 112 determine that the USB device 100 is not correctly coupledto the USB host 112 (step 318).

Next, after waiting for the second delay time t2 (step 320), the controlcircuit 104 starts entering an initializing activation procedure (step322) of the USB device 100. In the initializing activation procedure,the control circuit 104 of the USB device 100 feeds an internal sourceprogram (ISP) to initialize the USB device 100 (step 324). Please notethat, the ISP may be a firmware stored in a read-only memory (ROM).

Then, in step 326, when the USB device 100 completes the initialactivation procedure, the control circuit 104 stores the control word Scpreviously stored in the register into a flash memory. Hence, after theUSB device 100 completes the initial activation procedure, the flashmemory has already stored the desired control word Sc capable ofcontrolling the programmable oscillator 106 to generate the oscillatingsignal Sosc having the predetermined frequency Fp. When the USB device100 is coupled to the USB host 112 again, the control circuit 104 nolonger needs to calibrate the programmable oscillator 106, and maydirectly read the control word Sc in the flash memory instead. In thisway, the USB device 100 of the present invention is capable ofgenerating a reference clock having a precise frequency with lower cost.

Please note that, in step 316, after the control circuit 104 temporarilystores the corresponding control word Sc into the register, the controlcircuit 104 does not need to disable the terminal impedance 110 of theUSB device 100. Specifically, in another embodiment of the presentinvention, when the control circuit 104 calculates the correspondingcontrol word Sc and then temporarily stores the control word Sc into theregister, the control circuit 104 further continuously enables theterminal impedance 110 of the USB device 100, and controls the USBdevice 100 to generate another polling low frequency periodic signal Spsto the USB host 112. In this way, when the USB host 112 receives thepolling low frequency periodic signal Sps from the USB device 100, theUSB host 112 enters the state 2064 shown in FIG. 2. Then, the USB host112 and the USB device 100 directly enter the ultra-high datatransmission mode, e.g., the state 208 shown in FIG. 2.

Please refer to FIG. 5, which is a diagram illustrating a controlcircuit 104 according to an embodiment of the present invention. Thecontrol circuit 104 includes a frequency divider 1042, a frequencycomparator 1044 and a signal synthesizing circuit 1046. Please notethat, in order to more clearly describe the technical features of thecontrol circuit 104, the programmable oscillator 106 of the presentinvention is illustrated in FIG. 5. The frequency divider 1042 iscoupled to the programmable oscillator 106, and arranged to perform afrequency dividing operation upon the oscillating signal Sosc togenerate a feedback signal Sfb. The frequency comparator 1044 is coupledto the frequency divider 1042, and arranged to compare a first frequency(i.e., the frequency of the detection oscillating signal Spsr) of thelow frequency periodic signal Sps with a second frequency of thefeedback signal Sfb to generate a comparison result Sr, and to adjustthe programmable oscillator 106 according to the comparison result Srfor generating the oscillating signal Sosc having the predeterminedfrequency Fp. The signal synthesizing circuit 1046 is coupled to theprogrammable oscillator 106, and arranged to generate a specific clocksignal Sp according to the oscillating signal Sosc, where the frequencyof the specific clock signal Sp is higher than the frequency of theoscillating signal Sosc, and the frequency comparator 1044 furtherutilizes the specific clock signal Sp to detect the second frequency ofthe feedback signal Sfb.

Further, the method for operating the control circuit 104 may berepresented by the flowchart of FIG. 6. Please refer to FIG. 6, which isa flowchart illustrating a calibration method 600 arranged forcalibrating the programmable oscillator 106 based on the low frequencyperiodic signal Sps according to an embodiment of the present invention.Provided that the result is substantially the same, the steps are notrequired to be executed in the exact order shown in FIG. 6. That is,other steps may be inserted into the steps in FIG. 6. The frequencycalibration method 600 includes the following steps.

Step 602: Control the programmable oscillator 106 to generate theoscillating signal Sosc.

Step 604: Perform a frequency dividing operation upon the oscillatingsignal Sosc to generate a feedback signal Sfb.

Step 606: Utilize the signal synthesizing circuit 1046 to synthesize thespecific clock signal Sp according to the oscillating signal Sosc.

Step 608: Utilize the frequency comparator 1044 to receive the detectionoscillating signal Spsr, the feedback signal Sfb and the specific clocksignal Sp.

Step 610: Utilize the specific clock signal Sp to control the frequencycomparator 1044, to detect a second frequency of the feedback signalSfb.

Step 612: Utilize the frequency comparator 1044 to compare the firstfrequency of the low frequency periodic signal Sps with the secondfrequency of the feedback signal Sfb, to generate a comparison resultSr.

Step 614: Adjust the programmable oscillator 106 according to thecomparison result Sr, to generate the oscillating signal Sosc having thepredetermined frequency Fp.

Please note that, in this embodiment, the frequency of the specificclock signal Sp is higher than the frequency of the oscillating signalSosc. For example, the frequency of the specific clock signal Sp may betwice or triple the frequency of the oscillating signal Sosc. Hence, thefrequency comparator 1044 may use the specific clock signal Sp toeffectively calculate the period of the feedback signal Sfb, therebycalculating the oscillating frequency of the feedback signal Sfb (i.e.,the second frequency). Then, the frequency comparator 1044 may comparethe frequency of the detection oscillating signal Spsr with the secondfrequency of the feedback signal Sfb to generate the comparison resultSr used to adjust the control word Sc of the programmable oscillator106. In this way, when the loop shown in FIG. 5 is finally phase-lockedthrough repeated calculations and adjustments, it represents that thefrequency of the detection oscillating signal Spsr equals the secondfrequency of the feedback signal Sfb. Further, since the frequencydivider 1042 in this embodiment has a fixed divisor (e.g., 240). Hence,when the loop is phase-locked, the oscillating signal Sosc generated bythe programmable oscillator 106 is exactly the oscillating signal havingrequired frequency (e.g., the 24 MHz oscillating signal), and thisoscillating signal may be used as a reference clock of the USB device100. Please note that, in another embodiment, the signal synthesizingcircuit 1046 may be implemented with a phase-locked loop (PLL).

In view of above, when the USB host 112 performs polling on the USBdevice 100, the devices and methods provided by the present inventionintentionally delay the time of the USB host 112 performing the pollingoperation upon the USB device 100, to make the USB device 100 extractthe detection oscillating signal Spsr having a frequency the same asthat of the polling low frequency periodic signal Sps, and utilize thedetection oscillating signal Spsr to calibrate the programmableoscillator 106. Hence, the present invention is capable of generating areference clock having a precise frequency without arranging a built-inprecise inductor capacitor oscillator (LC oscillator). Hence, comparedwith traditional designs, the USB device 100 of the present inventionhas a lower production cost.

Those skilled in the art will readily observe that numerousmodifications and alterations of the device and method may be made whileretaining the teachings of the invention. Accordingly, the abovedisclosure should be construed as limited only by the metes and boundsof the appended claims.

What is claimed is:
 1. A frequency calibration method applied to aUniversal Serial Bus (USB) device, comprising: coupling the USB deviceto a USB host, wherein the USB device comprises at least a programmableoscillator; utilizing the USB device to extract a low frequency periodicsignal (LFPS) from the USB host; utilizing the programmable oscillatorto generate an oscillating signal; performing a frequency dividingoperation upon the oscillating signal, to generate a feedback signal;generating a specific clock signal according to the oscillating signal;and utilizing the specific clock signal to detect a second frequency ofthe feedback signal; comparing a first frequency of the low frequencyperiodic signal and the second frequency of the feedback signal, togenerate a comparison result; and adjusting the programmable oscillatoraccording to the comparison result, to generate the oscillating signalhaving the predetermined frequency; wherein a frequency of the specificclock signal is higher than a frequency of the oscillating signal. 2.The frequency calibration method of claim 1, wherein a duty cycle of thelow frequency periodic signal is approximately 10%, and a frequency ofthe low frequency periodic signal is approximately 100 KHz.
 3. Thefrequency calibration method of claim 1, further comprising: when theUSB device receives the low frequency periodic signal from the USB host,controlling the USB device to generate a predetermined signal having afrequency higher than a frequency of the low frequency periodic signalto the USB host, to make the USB host continuously generate the lowfrequency periodic signal to the USB device.
 4. The frequencycalibration method of claim 1, further comprising: when the USB devicereceives the low frequency periodic signal from the USB host,controlling the USB device to stop generating any signal to the USBhost, to make the USB host continuously generate the low frequencyperiodic signal to the USB device.
 5. The frequency calibration methodof claim 1, further comprising: when the USB device receives the lowfrequency periodic signal from the USB host, controlling the USB deviceto generate a predetermined signal having a frequency different from afrequency of the low frequency periodic signal to the USB host, to makethe USB host continuously generate the low frequency periodic signal tothe USB device.
 6. The frequency calibration method of claim 1, furthercomprising: when the programmable oscillator generates the oscillatingsignal having the predetermined frequency, temporarily storing a controlword arranged for controlling the programmable oscillator into aregister.
 7. The frequency calibration method of claim 6, furthercomprising: when the USB device completes an initial activationprocedure, storing the control word into a flash memory.
 8. Thefrequency calibration method of claim 1, further comprising: when theUSB device is coupled to the USB host, controlling the USB device toenable a terminal impedance of the USB device, to make the USB host sendthe low frequency periodic signal to the USB device.
 9. The frequencycalibration method of claim 8, further comprising: when the programmableoscillator generates the oscillating signal having the predeterminedfrequency, controlling the USB device to disable the terminal impedanceof the USB device.
 10. The frequency calibration method of claim 1,further comprising: when the programmable oscillator generates theoscillating signal having the predetermined frequency, controlling theUSB device to generate another low frequency periodic signal to the USBhost.
 11. A Universal Serial Bus (USB) device, comprising: a detectioncircuit, arranged to extract a low frequency periodic signal (LFPS) fromthe USB host; a programmable oscillator, arranged to generate anoscillating signal; a control circuit, coupled to the detection circuitand the programmable oscillator, the control circuit arranged tocalibrate the programmable oscillator according to the low frequencyperiodic signal, to make the programmable oscillator generate theoscillating signal having a predetermined frequency; a frequencydivider, coupled to the programmable oscillator, the frequency dividerarranged to perform a frequency dividing operation upon the oscillatingsignal to generate a feedback signal; and a frequency comparator,coupled to the frequency divider, the frequency comparator arranged tocompare a first frequency of the low frequency periodic signal with asecond frequency of the feedback signal to generate a comparison result,and to adjust the programmable oscillator according to the comparisonresult to generate the oscillating signal having the predeterminedfrequency; wherein the control circuit further comprises a signalsynthesizing circuit coupled to the programmable oscillator, the signalsynthesizing circuit arranged to generate a specific clock signalaccording to the oscillating signal; and a frequency of the specificclock signal is higher than a frequency of the oscillating signal, andthe frequency comparator further utilizes the specific clock signal todetect the second frequency of the feedback signal.
 12. The USB deviceof claim 11, wherein a duty cycle of the low frequency periodic signalis approximately 10%, and a frequency of the low frequency periodicsignal is approximately 100 KHz.
 13. The USB device of claim 11, furthercomprising: a transmission circuit, coupled to the control circuit;wherein when the USB device extracts the low frequency periodic signalfrom the USB host, the control circuit further controls the transmissioncircuit to send a predetermined signal having a frequency higher than afrequency of the low frequency periodic signal to the USB host, to makethe USB host continuously generate the low frequency periodic signal tothe detection circuit.
 14. The USB device of claim 11, furthercomprising: a transmission circuit, coupled to the control circuit;wherein when the USB device extracts the low frequency periodic signalfrom the USB host, the control circuit further controls the transmissioncircuit to stop sending any signal to the USB host, to make the USB hostcontinuously generate the low frequency periodic signal to the detectioncircuit.
 15. The USB device of claim 11, further comprising: atransmission circuit, coupled to the control circuit; wherein when theUSB device extracts the low frequency periodic signal from the USB host,the control circuit further controls the transmission circuit to send apredetermined signal having a frequency different from a frequency ofthe low frequency periodic signal to the USB host, to make the USB hostcontinuously generate the low frequency periodic signal to the detectioncircuit.
 16. The USB device of claim 11, wherein when the programmableoscillator generates the oscillating signal having the predeterminedfrequency, the control circuit further temporarily stores a control wordarranged for controlling the programmable oscillator into a register.17. The USB device of claim 16, wherein when the USB device completes aninitial activation procedure, the control circuit further stores thecontrol word into a flash memory.
 18. The USB device of claim 11,further comprising: a terminal impedance, coupled to the control circuitand a signal port of the detection circuit; wherein when the USB deviceis coupled to the USB host, the control circuit further enables theterminal impedance, to make the USB host send the low frequency periodicsignal to the USB device; and the detection circuit receives the lowfrequency periodic signal through the signal port.
 19. The USB device ofclaim 18, wherein when the programmable oscillator generates theoscillating signal having the predetermined frequency, the controlcircuit further disables the terminal impedance.
 20. The USB device ofclaim 11, further comprising: a transmission circuit, coupled to thecontrol circuit; wherein when the programmable oscillator generates theoscillating signal having the predetermined frequency, the controlcircuit further controls the transmission circuit to generate anotherlow frequency periodic signal to the USB host.